﻿using WebApiClientCore;
using WebApiClientCore.Attributes;
using BPM.Web.Shared.Data;
namespace BPM.Web.Shared.Service;

public interface ICacheClient : IHttpApi
{
    /// <summary>
    /// 获取所有缓存关键字
    /// </summary>
    /// <returns>Success</returns>
    /// <exception cref="ApiException">A server side error occurred.</exception>
    [HttpGet("sysCache/keyList")]
    ITask<XnRestfulResult<List<string>>> KeyListAsync(CancellationToken token = default);

    /// <summary>
    /// 删除指定关键字缓存
    /// </summary>
    /// <returns>Success</returns>
    /// <exception cref="ApiException">A server side error occurred.</exception>
    [HttpGet("sysCache/remove")]
    Task<XnRestfulResult<string>> RemoveAsync(string key, CancellationToken token = default);

    /// <summary>
    /// 获取缓存
    /// </summary>
    /// <returns>Success</returns>
    /// <exception cref="ApiException">A server side error occurred.</exception>
    [HttpGet("sysCache/detail")]
    ITask<XnRestfulResult<string>> DetailGET6Async(QueryCacheInput body, string cacheKey, CancellationToken token = default);
}
